load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "rules_scala",
    srcs = [
        "scala_library.go",
        "scala_proto_library.go",
    ],
    importpath = "github.com/stackb/rules_proto/pkg/rule/rules_scala",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/plugin/akka/akka_grpc",
        "//pkg/plugin/scalapb/scalapb",
        "//pkg/protoc",
        "@bazel_gazelle//config:go_default_library",
        "@bazel_gazelle//label:go_default_library",
        "@bazel_gazelle//resolve:go_default_library",
        "@bazel_gazelle//rule:go_default_library",
        "@com_github_bmatcuk_doublestar//:doublestar",
        "@com_github_emicklei_proto//:proto",
    ],
)

go_test(
    name = "rules_scala_test",
    srcs = ["scala_library_test.go"],
    embed = [":rules_scala"],
    deps = [
        "//pkg/protoc",
        "@bazel_gazelle//config:go_default_library",
        "@bazel_gazelle//label:go_default_library",
        "@bazel_gazelle//resolve:go_default_library",
        "@bazel_gazelle//rule:go_default_library",
        "@com_github_google_go_cmp//cmp",
    ],
)

filegroup(
    name = "all_files",
    testonly = True,
    srcs = [
        "BUILD.bazel",
    ] + glob(["*.go"]),
    visibility = ["//pkg:__pkg__"],
)
